//
//  ShopCollectionSecData.m
//  __PRODUCTNAME__
//
//  Created by LL.F on 16/09/09
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "ShopCollectionSecData.h"
#import "ShopCollectionVisualcodelist.h"
#import "ShopCollectionImagelist.h"
#import "ShopCollectionCommoditytype.h"

@implementation ShopCollectionSecData

+ (NSDictionary *)objectClassInArray{
    return @{@"visualCodeList" : [ShopCollectionVisualcodelist class], @"imageList" : [ShopCollectionImagelist class]};
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
    if ([key isEqualToString:@"id"]) {
        _id_Data = [value integerValue];
    }
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"visualCodeList"]) {
        NSMutableArray<ShopCollectionVisualcodelist *>  *listArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ShopCollectionVisualcodelist *data = [ShopCollectionVisualcodelist modelWithDic:dic];
            [listArray addObject:data];
        }
        _visualCodeList = listArray;
    }
    if ([key isEqualToString:@"imageList"]) {
        NSMutableArray<ShopCollectionImagelist *>  *listArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ShopCollectionImagelist *data = [ShopCollectionImagelist modelWithDic:dic];
            [listArray addObject:data];
        }
        _imageList = listArray;
    }
    if ( [key isEqualToString:@"commodityType"]) {
        _commodityType = [ShopCollectionCommoditytype modelWithDic:value];
    }
    
}
@end
